home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <fcntl.h>
- #include <ctype.h>
- #include <time.h>
- #include <setjmp.h>
- #include <signal.h>
- #include <sys/types.h>
- #include <sys/dir.h>
- #include <sys/ipc.h>
- #include <sys/msg.h>
-
- #ifdef hpux
- #define locking lockf
- #endif
-
- #define true 1
- #define false 0
- #define FWDTMP "/tmp/fwdtmp"
-
- #ifdef MAIN
- #define EXTERN
- #else
- #define EXTERN extern
- #endif
-
- #define DEVICE1 "ax0" /* NET devices (tnc's, etc) */
- #define DEVICE2 "ax1"
- #define DEVICE3 "ax2"
- #define DEVICE4 "ax3"
- #define DEVICE5 "ax4"
-
- /* #define HOMEDIR "/usr/xobbs/" /*Home directory for bbs*/
- EXTERN char homedir[30]; /* change for your system */
-
- EXTERN jmp_buf mark; /*buffer for setjmp*/
- EXTERN char fwddist[30]; /*forwarding distribution file name*/
- EXTERN char fwddir[30]; /*forwarding directory*/
- EXTERN char maildir[30]; /*mail directory path*/
- EXTERN char filedir[30]; /*file directory path*/
- EXTERN char tempdir[30]; /*temp mail directory*/
- EXTERN char usenetfil[30]; /*usenet distribution file*/
- EXTERN char paramfil[30]; /*bbs database parameter file*/
- EXTERN char fwdfile[30]; /*bbs forwarding file */
- EXTERN char motdfil[30]; /*message of the day file*/
- EXTERN char maildae[30]; /*mail daemon path*/
- EXTERN char userfil[30]; /*user file path*/
- EXTERN char hdrfile[30]; /*mail header file*/
- EXTERN char logfile[30]; /*bbs log file*/
- EXTERN char inline[1024]; /*input line*/
- EXTERN char prinbuf[1024]; /*print output buffer*/
- EXTERN int fwding; /*boolean meaning "doing forwarding*/
- EXTERN int outfd; /*output file discriptor*/
- EXTERN int infd; /*input file discriptor*/
- EXTERN int dpid; /*daemon pid*/
- EXTERN int local; /*local/remote flag*/
- EXTERN int revfwd; /*do reverse forward flag*/
- EXTERN int quitflag; /*do a quit and dont reset alarm*/
- EXTERN int alrmtim; /* "time to live" of the bbs */
- EXTERN int smsgqid; /* send message que identifier*/
- EXTERN int rmsgqid; /* receive message que identifier*/
- EXTERN int rcmsgqid; /* control message que ids */
- EXTERN int scmsgqid;
- EXTERN int pid; /* pid of this bbs process*/
-
-
-
- struct msghdr{ /* template for message header */
- int siz; /* message size*/
- char tocall[7]; /* 'to' call */
- char fromcall[7]; /* 'from' call */
- char atbbs[7]; /* ' @ bbs field */
- char stat; /* message status (Y/N/F) */
- char type; /* message type (B/P etc) */
- char dat[7]; /* date filed */
- char tim[5]; /* time filed */
- char title[67]; /* subject of message */
- char bid[13]; /* bid of message */
- };
-
- struct stninfo{ /*info about a station*/
- char call[7];
- char name[15];
- char qth[25];
- char typ;
- int highest;
- } ;
-
- struct cmd{ /*structure of a parsed*/
- char func; /*function requested*/ /* command line and args*/
- char opt; /*option requested*/
- char fld[10][30]; /*fields follow*/
- };
-
- struct userrecord{ /*user record in xouserfile*/
- char call[8];
- char type;
- int highest;
- char name[20];
- char dat[8];
- };
-
- struct message{ /*message buffer*/
- long mtype;
- char mtext[256]
- } msg;
-
- #ifdef MAIN
- struct stninfo my;
- struct stninfo user;
-
- struct cmd command;
- struct tm *newtime;
-
- #else
- extern struct stninfo my,user;
- extern struct cmd command;
- extern struct tm *newtime;
-
- #endif
-
- EXTERN int msgcnt; /*count of messages active*/
- EXTERN int highnum; /*highest message number*/
-
- char *upcase();
- char *lowcase();
- char xogetc();
- int kil_spwn();
-
- #define FLUSH 1 /*flags to prinout routine*/
- #define NOFLUSH 0
-
-